package com.icloud.wallet.boot.controller.internal;

import com.icloud.common.core.api.CommonResult;
import com.icloud.wallet.api.dto.CustomerHotArticleDto;
import com.icloud.wallet.api.dto.CustomerRewardDto;
import com.icloud.wallet.api.feign.CustomerOrderFeign;
import com.icloud.wallet.boot.service.IArticleOrderService;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@Api(tags = "订单内部接口")
@RequestMapping("/wallet/internal/order")
@RequiredArgsConstructor
public class InternalAppOrderController implements CustomerOrderFeign {
    private final IArticleOrderService iArticleOrderService;

    @Override
    public CommonResult<Boolean> rewardArticle(CustomerRewardDto dto) {
        return CommonResult.success(iArticleOrderService.reward(dto));
    }

    @Override
    public CommonResult<Boolean> hotArticle(CustomerHotArticleDto dto) {
        return CommonResult.success(iArticleOrderService.hotArticle(dto));
    }
}
